
Page({
  data: {

   
    Xiangmu:{},
  },
  yuyue: function (e) {

    console.log("开始：" + e.currentTarget.dataset.id);
    console.log(e.currentTarget.dataset.name);
    wx.setStorage({
      key: "ipic",
      data: e.currentTarget.dataset.pic
    });
    wx.setStorage({
      key: "iid",
      data: e.currentTarget.dataset.iid
    });
    wx.setStorage({
      key: "area",
      data: e.currentTarget.dataset.area
    });
    wx.setStorage({
      key: "day",
      data: e.currentTarget.dataset.day
    });
    wx.setStorage({
      key: "avatar",
      data: e.currentTarget.dataset.avatar
    });
    wx.setStorage({
      key: "name",
      data: e.currentTarget.dataset.name
    });
    wx.setStorage({
      key: "fee",
      data: e.currentTarget.dataset.fee
    });
    wx.setStorage({
      key: "experience",
      data: e.currentTarget.dataset.experience
    });
    wx.navigateTo({
      url: '../order/order'
    });
  },
  changeIndicatorDots: function (e) {
    this.setData({
      indicatorDots: !this.data.indicatorDots
    })
  },
  changeAutoplay: function (e) {
    this.setData({
      autoplay: !this.data.autoplay
    })
  },
  intervalChange: function (e) {
    this.setData({
      interval: e.detail.value
    })
  },
  durationChange: function (e) {
    this.setData({
      duration: e.detail.value
    })
  },
  upper: function (e) {
    console.log(e)
  },
  lower: function (e) {
    console.log(e)
  },
  scroll: function (e) {
    console.log(e)
  },
  tap: function (e) {
    for (var i = 0; i < order.length; ++i) {
      if (order[i] === this.data.toView) {
        this.setData({
          toView: order[i + 1]
        })
        break
      }
    }
  },
  tapMove: function (e) {
    this.setData({
      scrollTop: this.data.scrollTop + 10
    })
  },
  onLoad: function (options) {
    var thispage = this;
    wx.getStorage({
      key: 'iid',
      success: function (res) {
        console.log("哈哈"+res.data)
       
        wx.request({
          url: 'http://localhost:8080/show',
          data: {
            id: res.data
          },
          method: 'POST',
          header: {
            'content-type': 'application/x-www-form-urlencoded' // 默认值
          },
          success: function (res) {

            console.log(res.data)
            // console.log(res.data[0])
            // console.log(res.data[1])

             thispage.setData({Xiangmu:res.data })

          },
          complete: function (res) {



          }
        });
      }
    });
    
  }
})
